package parser;

import represent.expression.Predicate;
import server.SimpleDB;
import storage.transaction.Transaction;

public class DeleteData extends ManipulateData {

	private String tblname;
	private Predicate pred;

	public DeleteData(String table_name, Predicate pred) {
		tblname = table_name;
		this.pred = pred;
	}

	public String tableName() {
		return tblname;
	}

	public Predicate pred() {
		return pred;
	}

	@Override
	public int execute(Transaction tx) {
		return SimpleDB.uplanner().executeDelete(this, tx);
	}
}
